<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表格练习</title>
</head>
<body>

<table border="1px">
    <caption>表格标题</caption>
    <tr>
        <th>序号</th>
        <th>讲师</th>
        <th>内容</th>
    </tr>
    <tr>
        <td>1</td>
        <td>22222222</td>
        <td>3</td>
    </tr>
    <tr>
        <td>4</td>
        <td>5</td>
        <td>6</td>
    </tr>
</table>
<br>
<!--4*4表格   table>tr>td*4-->
<table border="1px">
    <tr>
        <td>1-1</td>
        <td>1-2</td>
        <td>1-3</td>
        <td>1-4</td>
    </tr>
     <tr>
<!--  colspan 横向合并       -->
        <td colspan="2">2-1</td>
<!--        <td>2-2</td>-->
        <td>2-3</td>
<!--  rowspan 竖向合并       -->
        <td rowspan="3">2-4</td>
    </tr>
     <tr>
        <td>3-1</td>
        <td>3-2</td>
        <td>3-3</td>
<!--        <td>3-4</td>-->
    </tr>
     <tr>
        <td>4-1</td>
        <td>4-2</td>
        <td>4-3</td>
<!--        <td>4-4</td>-->
    </tr>
</table>
<hr>
<!--合并单元格-->
<table border="1px" style="border-collapse: collapse">
    <caption>购物车</caption>
    <tr>
        <th><b>商品编号</b></th>
        <th><b>商品名称</b></th>
        <th><b>商品价格</b></th>
    </tr>
    <tr>
        <td>1</td>
        <td>小米Air</td>
        <td>5877</td>
    </tr>
    <tr>
        <td>2</td>
        <td>华为遥遥遥遥领先</td>
        <td>8877</td>
    </tr>
    <tr>
        <td>总价:</td>
        <td colspan="2">10000</td>
<!--        <td>8877</td>-->
    </tr>
</table>
</body>
</html>



















